package cn.itcast.crm.service.impl;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.crm.dao.CustomerRepository;
import cn.itcast.crm.domain.Customer;
import cn.itcast.crm.service.CustomerService;

@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
	@Autowired
     private CustomerRepository customerRepository;
	@Override
	public List<Customer> findNoAssociationCustomers() {
		
		List<Customer> list = customerRepository.findByFixedAreaIdIsNull();
		return list;
	}

	@Override
	public List<Customer> findHasAssociationFixedAreaCustomers(String fixedAreaId) {
		List<Customer> list = customerRepository.findByFixedAreaId(fixedAreaId);
		return list;
	}

	@Override
	public void associationCustomersToFixedArea(String customerIdStr, String fixedAreaId) {
		// TODO Auto-generated method stub
		
	}


}
